<template>
  <div>
    <div class="cart-one">
      <van-row class="cart-two">
        <van-col span="5">
          <van-row>
            <van-col span="24">
              <img src="../../assets/images/product.jpg" alt>
            </van-col>
            <van-col span="24">
              <van-checkbox v-model="checked"></van-checkbox>
            </van-col>
          </van-row>
        </van-col>
        <van-col span="17">
          <van-row>
            <van-col span="24">放了时费发斯洛伐克睡觉了附件两份是发士大夫沙</van-col>
            <van-col span="24" class="span-interval">
              <span>￥499.00</span>
              <del>￥888.00</del>
              <span>x1双</span>
            </van-col>
            <van-col span="24">鞋码：50</van-col>
          </van-row>
        </van-col>
        <van-col span="2" class="span-arrows">
          <van-icon name="arrow"/>
        </van-col>
      </van-row>
      <van-submit-bar :price="3050" button-text="提交订单" @submit="onSubmit" top/>
      <router-view></router-view>
    </div>
  </div>
</template>
<script>
import { mobile } from '@/api'
export default {
  data () {
    return {
      radio: '',
      checked: '',
      cartIndex: {
        page: 1,
        pageSize: 3
      }
    }
  },
  created () {
    this.initCart()
  },
  methods: {
    initCart () {
      mobile.getCart(this.cartIndex)
        .then(res => {
          console.log(res)
        })
    },
    onSubmit () {}
  }
}
</script>
<style lang="scss" scoped>
  .van-submit-bar {
    bottom: 50px;
    border-top: 1xp solid black;
  }
  .van-row {
    .van-col {
      img {
        width: 100%;
      }
    }
  }
  .cart-two {
    border-bottom: 1px solid #ccc;
    padding: 10px 0;
    font-size: 12px;
    .span-interval {
      margin: 10px 0;
      span:last-child{
        float: right;
      }
      span:nth-child(1) {
        color: red;
      }
    }
    .span-arrows {
    line-height: 85px;
    text-align: right;
    >i {
      font-size: 18px;
    }
    }
  }
  .cart-one {
    padding-left: 10px;
  }
</style>
